<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link rel="shortcut icon" href="favicon.ico">
    <meta name="keywords" content="小北IT,玩机,灰度,灰度开源项目,软件库,拾穗集,还你干净的世界" />
    <meta name="description" content="灰度网页版，轻奢，极简，悦享，还你干净的世界" />
    <style type="text/css">
        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            text-align: center;
            background-color: #282828;
        }

        .content {
            width: 100%;
            margin: 0 auto;
        }

        .input,
        .google,
        .baidu,
        .jump {
            background-color: transparent;
            border-width: 1px;
            border-style: solid;
            border-radius: 35px;
            border-color: #BEBEBE;
            text-align: center;
            line-height: 360%;
            font-size: 1em;
            color: #C2C6C6;
            outline: 0;
            width: 80%;
            margin: 10px;
        }

        .input {
            font-weight: bold;
        }
    </style>
    <title>极简搜索</title>
    <link rel="shortcut icon" href="videoicon.png">
</head>

<body>
    <div class="content">
        <br>
        <br>
        <input type="text" id="text" value="" class="input" />
        <input type="button" value="Google" onclick="google()" class="google" />
        <input type="button" value="BaiDu" onclick="baidu()" class="baidu" />
        <input type="button" value="Jump" onclick="url()" class="jump" />
        <script type="text/javascript">
            var flag = document.getElementById('text');

            function google() {
                if (flag.value.indexOf("https://") >= 0) {
                    location.href = document.getElementById("text").value;
                } else {
                    if (flag.value.indexOf("http://") >= 0) {
                        location.href = document.getElementById("text").value;
                    } else {
                        location.href = "https://www.google.com.hk/search?safe=strict&q=" + document.getElementById("text").value;
                    }
                }
            }

            function baidu() {
                if (flag.value.indexOf("https://") >= 0) {
                    location.href = document.getElementById("text").value;
                } else {
                    if (flag.value.indexOf("http://") >= 0) {
                        location.href = document.getElementById("text").value;
                    } else {
                        location.href = "https://www.baidu.com/s?wd=" + document.getElementById("text").value;
                    }
                }
            }

            function url() {
                if (flag.value.indexOf("https://") >= 0) {
                    location.href = document.getElementById("text").value;
                } else {
                    if (flag.value.indexOf("http://") >= 0) {
                        location.href = document.getElementById("text").value;
                    } else {
                        location.href = "https://" + document.getElementById("text").value;
                    }
                }
            }
        </script>
    </div>
</body>

</html>